package com.yf.tz.dao;

import com.yf.tz.entity.MallSkuEntity;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 产品规格Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Jul 01 16:32:18 CST 2020
 */
@Mapper
public interface MallSkuDao extends BaseDao<MallSkuEntity> {


    /**

        List<MallSkuVo> queryListVo(MallSkuVo mallSkuVo);

        MallSkuVo getVo(Long id);

    **/

    void deleteByGoodsId(Long goodsId);

    void insertByList(@Param("list") List<MallSkuEntity> list, @Param("goodsId") Long goodsId);

    List<MallSkuEntity> findByGoodsId(Long goodsId);

    void decreaseStock(@Param("id") Long id, @Param("number") Integer number);

    void increaseStock(@Param("id") Long id, @Param("number") Integer number);
}
